package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.domain.dto.KingReceiveNoticeMaterialQueryDto;
import com.ly.heart.mapper.KingCheckMaterialUseDecisionMapper;
import com.ly.heart.service.IKingCheckMaterialUseDecisionService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.KingCheckMaterialUseDecisionEntity;

import javax.annotation.Resource;

/**
 * 金蝶-检验单使用决策信息Service业务层处理
 *
 * @author cxl
 * @date 2024-08-11
 */
@Service
public class KingCheckMaterialUseDecisionServiceImpl extends ServiceImpl<KingCheckMaterialUseDecisionMapper,KingCheckMaterialUseDecisionEntity> implements IKingCheckMaterialUseDecisionService {

    @Resource
    private KingCheckMaterialUseDecisionMapper kingCheckMaterialUseDecisionMapper;

    /**
     * 查询金蝶-检验单使用决策信息
     *
     * @param id 金蝶-检验单使用决策信息ID
     * @return 金蝶-检验单使用决策信息
     */
    @Override
    public KingCheckMaterialUseDecisionEntity selectKingCheckMaterialUseDecisionEntityById(String id)
    {
        return kingCheckMaterialUseDecisionMapper.selectKingCheckMaterialUseDecisionEntityById(id);
    }

    /**
     * 查询金蝶-检验单使用决策信息列表
     *
     * @param kingCheckMaterialUseDecisionEntity 金蝶-检验单使用决策信息
     * @return 金蝶-检验单使用决策信息
     */
    @Override
    public List<KingCheckMaterialUseDecisionEntity> selectKingCheckMaterialUseDecisionEntityList(KingCheckMaterialUseDecisionEntity kingCheckMaterialUseDecisionEntity)
    {
        return kingCheckMaterialUseDecisionMapper.selectKingCheckMaterialUseDecisionEntityList(kingCheckMaterialUseDecisionEntity);
    }

    /**
     * 新增金蝶-检验单使用决策信息
     *
     * @param kingCheckMaterialUseDecisionEntity 金蝶-检验单使用决策信息
     * @return 结果
     */
    @Override
    public int insertKingCheckMaterialUseDecisionEntity(KingCheckMaterialUseDecisionEntity kingCheckMaterialUseDecisionEntity)
    {
        kingCheckMaterialUseDecisionEntity.setCreateTime(DateUtils.getNowDate());
        return kingCheckMaterialUseDecisionMapper.insertKingCheckMaterialUseDecisionEntity(kingCheckMaterialUseDecisionEntity);
    }

    /**
     * 修改金蝶-检验单使用决策信息
     *
     * @param kingCheckMaterialUseDecisionEntity 金蝶-检验单使用决策信息
     * @return 结果
     */
    @Override
    public int updateKingCheckMaterialUseDecisionEntity(KingCheckMaterialUseDecisionEntity kingCheckMaterialUseDecisionEntity)
    {
        return kingCheckMaterialUseDecisionMapper.updateKingCheckMaterialUseDecisionEntity(kingCheckMaterialUseDecisionEntity);
    }

    /**
     * 批量删除金蝶-检验单使用决策信息
     *
     * @param ids 需要删除的金蝶-检验单使用决策信息ID
     * @return 结果
     */
    @Override
    public int deleteKingCheckMaterialUseDecisionEntityByIds(String[] ids)
    {
        return kingCheckMaterialUseDecisionMapper.deleteKingCheckMaterialUseDecisionEntityByIds(ids);
    }

    /**
     * 删除金蝶-检验单使用决策信息信息
     *
     * @param id 金蝶-检验单使用决策信息ID
     * @return 结果
     */
    @Override
    public int deleteKingCheckMaterialUseDecisionEntityById(String id)
    {
        return kingCheckMaterialUseDecisionMapper.deleteKingCheckMaterialUseDecisionEntityById(id);
    }

    @Override
    public String getTotalDecisionNumByByReceiveNotice(KingReceiveNoticeMaterialQueryDto materialQueryDto) {
        return kingCheckMaterialUseDecisionMapper.getTotalDecisionNumByByReceiveNotice(materialQueryDto);
    }

}
